$("#account-set").click(function () {
    location.href = "../account-set/account-set.html";
  });
$("#my-application").click(function () {
  var userId = localStorage.userId;
  if (!userId) {
    alert("请先登录");
    return false;
  }
    location.href = "../my-application/my-application.html";
  });
$("#browsing").click(function () {
  var userId = localStorage.userId;
  if (!userId) {
    alert("请先登录");
    return false;
  }
    location.href = "../browsing/browsing.html";
  });
$('#resume').click(function(){
  var userId = localStorage.userId;
  if (!userId) {
    alert("请先登录");
    return false;
  }
  location.href = '../resume/resume.html'
});
$('.user').click(function () {
  var userId = localStorage.userId;
  if (userId) {
    location.href = "../account-set/account-set.html";
    return false;
  }else {
    location.href = "../login/login.html";
  }
   
})
 var My = {
   render() {
    var phone =localStorage.phone;
    var userName = localStorage.userName;
    if (phone) {
      $('#phone').show().html(`
        <p class="fw-500 f20">${userName}</p>
        <p class="fw-500 mt-10">${phone}</p>
          `);
        $('#login').hide();
        $('#head1').hide();
        $('#head2').show();
        $('#set1').show();
        $('#set2').hide();
    }else {
      $('#phone').hide()
      $('#login').show();
      $('#head1').show();
      $('#head2').hide();
      $('#set1').hide();
      $('#set2').show();
    }
     
   }
 }